from django.contrib import admin
from .models import Course, CourseCategory, Purchase


@admin.register(CourseCategory)
class CourseCategory(admin.ModelAdmin):
    list_display = ['name']
    search_fields = ['name']


@admin.register(Course)
class CourseAdmin(admin.ModelAdmin):
    list_display = ['name', 'createAt', 'price', 'isFree']
    list_filter = ['createAt', 'price']
    search_fields = ['name', 'description']


@admin.register(Purchase)
class PurchaseAdmin(admin.ModelAdmin):
    pass
